Conversation
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix a local version/build issue by ensuring the generated versionInfo module is created as part of common lifecycle steps.
Changes:
- Adds a
postinstallscript to runbuild-versionafter dependency installation. - Adds a
prestartscript to runbuild-versionbefore starting the dev server.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "postinstall": "npm run build-version", | ||
| "prestart": "npm run build-version", |
There was a problem hiding this comment.
Adding a postinstall hook to run build-version will break installs for consumers of the published npm package: build-version depends on timestamp.sh and writes src/versionInfo.ts, but the published package only includes dist/, README.md, and LICENSE (no src/ or timestamp.sh). Consider removing postinstall, or making it conditional (only run in a git checkout where src/ + timestamp.sh exist), or generating version info during build/pack so install doesn’t need to run scripts.
| "postinstall": "npm run build-version", | |
| "prestart": "npm run build-version", | |
| "postinstall": "if [ -f timestamp.sh ] && [ -d src ]; then npm run build-version; else echo \"Skipping build-version during postinstall: sources not available.\"; fi", | |
| "prestart": "if [ -f timestamp.sh ] && [ -d src ]; then npm run build-version; else echo \"Skipping build-version before start: sources not available.\"; fi", |
|
Actually I don't think we need this. I should've just ran build version. sorry. |
There was a problem with version when i tried to run locally and this fixed it.